package day5.pet;

/**
 * @author oldliu
 * @since 1.0
 */
public class Dog {
    private String name;
    private int legs;

    public Dog(String name, int legs) {
        this.name = name;
        this.legs = legs;
    }
    public void show(){
        System.out.println("这条狗的名字叫"+name+",有"+legs+"条腿！");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getLegs() {
        return legs;
    }

    public void setLegs(int legs) {
        this.legs = legs;
    }
}
